package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.SetMassEvent;

public class SetMassStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public SetMassStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.SET_MASS);
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		SetMassEvent fullEvent = (SetMassEvent) event;
		physModel.setMass(fullEvent.mass);		
	}

}
